/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;


init(config: OpenApi.Config){
  super(config);
  @endpointRule = '';
  
  checkConfig(config);
  @endpoint = getEndpoint('imp', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }
  
  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model AssetsAuditAssetResponse {
  requestId?: string(name='RequestId'),
  status?: RpcStatus(name='Status'),
}

model AssetsCreateAssetResponse {
  asset?: CommonAsset(name='Asset'),
  requestId?: string(name='RequestId'),
  status?: RpcStatus(name='Status'),
}

model AssetsDeleteAssetResponse {
  asset?: CommonAsset(name='Asset'),
  requestId?: string(name='RequestId'),
  status?: RpcStatus(name='Status'),
}

model AssetsGetAssetResponse {
  asset?: CommonAsset(name='Asset'),
  requestId?: string(name='RequestId'),
  status?: RpcStatus(name='Status'),
}

model AssetsListAssetsRequest {
  appId?: string(name='AppId'),
  fieldMask?: string(name='FieldMask'),
  maxResults?: int32(name='MaxResults'),
  nextToken?: string(name='NextToken'),
  params?: string(name='Params'),
  topic?: string(name='Topic'),
}

model AssetsListAssetsResponse {
  assets?: [
    CommonAsset
  ](name='Assets'),
  nextToken?: string(name='NextToken'),
  requestId?: string(name='RequestId'),
  status?: RpcStatus(name='Status'),
}

model AssetsUpdateAssetResponse {
  asset?: CommonAsset(name='Asset'),
  requestId?: string(name='RequestId'),
  status?: RpcStatus(name='Status'),
}

model CommonAddress {
  address?: string(name='Address'),
  city?: string(name='City'),
  country?: string(name='Country'),
  state?: string(name='State'),
  zip?: string(name='Zip'),
}

model CommonAsset {
  address?: CommonAddress(name='Address'),
  appId?: string(name='AppId'),
  auditStatus?: string(name='AuditStatus'),
  author?: string(name='Author'),
  createdAt?: string(name='CreatedAt'),
  description?: string(name='Description'),
  extends?: map[string]any(name='Extends'),
  id?: string(name='Id'),
  images?: [
    CommonMediaResource
  ](name='Images'),
  labels?: map[string]any(name='Labels'),
  location?: TypeLatLng(name='Location'),
  source?: string(name='Source'),
  status?: string(name='Status'),
  synopsis?: string(name='Synopsis'),
  tags?: [ string ](name='Tags'),
  title?: string(name='Title'),
  updatedAt?: string(name='UpdatedAt'),
  videos?: [
    CommonMediaResource
  ](name='Videos'),
}

model CommonMediaResource {
  format?: string(name='Format'),
  id?: string(name='Id'),
  name?: string(name='Name'),
  sha1?: string(name='Sha1'),
  size?: long(name='Size'),
  url?: string(name='Url'),
}

model CommonSimpleAsset {
  address?: CommonAddress(name='Address'),
  appId?: string(name='AppId'),
  auditStatus?: string(name='AuditStatus'),
  author?: string(name='Author'),
  description?: string(name='Description'),
  extends?: map[string]any(name='Extends'),
  id?: string(name='Id'),
  image?: CommonMediaResource(name='Image'),
  labels?: map[string]any(name='Labels'),
  location?: TypeLatLng(name='Location'),
  source?: string(name='Source'),
  status?: string(name='Status'),
  synopsis?: string(name='Synopsis'),
  tags?: [ string ](name='Tags'),
  title?: string(name='Title'),
  video?: CommonMediaResource(name='Video'),
}

model RpcStatus {
  code?: int32(name='Code'),
  detail?: string(name='Detail'),
  message?: string(name='Message'),
}

model TypeLatLng {
  latitude?: double(name='Latitude'),
  longitude?: double(name='Longitude'),
}

model BanAllCommentRequest {
  appId?: string(name='AppId'),
  roomId?: string(name='RoomId'),
  userId?: string(name='UserId'),
}

model BanAllCommentResponseBody = {
  requestId?: string(name='RequestId'),
  result?: boolean(name='Result'),
}

model BanAllCommentResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: BanAllCommentResponseBody(name='body'),
}

async function banAllCommentWithOptions(request: BanAllCommentRequest, runtime: Util.RuntimeOptions): BanAllCommentResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.roomId)) {
    body['RoomId'] = request.roomId;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'BanAllComment',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function banAllComment(request: BanAllCommentRequest): BanAllCommentResponse {
  var runtime = new Util.RuntimeOptions{};
  return banAllCommentWithOptions(request, runtime);
}

model BanCommentRequest {
  appId?: string(name='AppId'),
  banCommentTime?: long(name='BanCommentTime'),
  banCommentUser?: string(name='BanCommentUser'),
  roomId?: string(name='RoomId'),
  userId?: string(name='UserId'),
}

model BanCommentResponseBody = {
  requestId?: string(name='RequestId'),
  result?: boolean(name='Result'),
}

model BanCommentResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: BanCommentResponseBody(name='body'),
}

async function banCommentWithOptions(request: BanCommentRequest, runtime: Util.RuntimeOptions): BanCommentResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.banCommentTime)) {
    body['BanCommentTime'] = request.banCommentTime;
  }
  if (!Util.isUnset(request.banCommentUser)) {
    body['BanCommentUser'] = request.banCommentUser;
  }
  if (!Util.isUnset(request.roomId)) {
    body['RoomId'] = request.roomId;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'BanComment',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function banComment(request: BanCommentRequest): BanCommentResponse {
  var runtime = new Util.RuntimeOptions{};
  return banCommentWithOptions(request, runtime);
}

model CancelBanAllCommentRequest {
  appId?: string(name='AppId'),
  roomId?: string(name='RoomId'),
  userId?: string(name='UserId'),
}

model CancelBanAllCommentResponseBody = {
  requestId?: string(name='RequestId'),
  result?: boolean(name='Result'),
}

model CancelBanAllCommentResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CancelBanAllCommentResponseBody(name='body'),
}

async function cancelBanAllCommentWithOptions(request: CancelBanAllCommentRequest, runtime: Util.RuntimeOptions): CancelBanAllCommentResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.roomId)) {
    body['RoomId'] = request.roomId;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CancelBanAllComment',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function cancelBanAllComment(request: CancelBanAllCommentRequest): CancelBanAllCommentResponse {
  var runtime = new Util.RuntimeOptions{};
  return cancelBanAllCommentWithOptions(request, runtime);
}

model CancelBanCommentRequest {
  appId?: string(name='AppId'),
  banCommentUser?: string(name='BanCommentUser'),
  roomId?: string(name='RoomId'),
  userId?: string(name='UserId'),
}

model CancelBanCommentResponseBody = {
  requestId?: string(name='RequestId'),
  result?: boolean(name='Result'),
}

model CancelBanCommentResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CancelBanCommentResponseBody(name='body'),
}

async function cancelBanCommentWithOptions(request: CancelBanCommentRequest, runtime: Util.RuntimeOptions): CancelBanCommentResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.banCommentUser)) {
    body['BanCommentUser'] = request.banCommentUser;
  }
  if (!Util.isUnset(request.roomId)) {
    body['RoomId'] = request.roomId;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CancelBanComment',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function cancelBanComment(request: CancelBanCommentRequest): CancelBanCommentResponse {
  var runtime = new Util.RuntimeOptions{};
  return cancelBanCommentWithOptions(request, runtime);
}

model CancelUserAdminRequest {
  appId?: string(name='AppId'),
  roomId?: string(name='RoomId'),
  userId?: string(name='UserId'),
}

model CancelUserAdminResponseBody = {
  requestId?: string(name='RequestId'),
}

model CancelUserAdminResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CancelUserAdminResponseBody(name='body'),
}

async function cancelUserAdminWithOptions(request: CancelUserAdminRequest, runtime: Util.RuntimeOptions): CancelUserAdminResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.roomId)) {
    body['RoomId'] = request.roomId;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CancelUserAdmin',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function cancelUserAdmin(request: CancelUserAdminRequest): CancelUserAdminResponse {
  var runtime = new Util.RuntimeOptions{};
  return cancelUserAdminWithOptions(request, runtime);
}

model CreateClassRequest {
  appId?: string(name='AppId'),
  createNickname?: string(name='CreateNickname'),
  createUserId?: string(name='CreateUserId'),
  title?: string(name='Title'),
}

model CreateClassResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    classId?: string(name='ClassId'),
    confId?: string(name='ConfId'),
    createNickname?: string(name='CreateNickname'),
    createUserId?: string(name='CreateUserId'),
    liveId?: string(name='LiveId'),
    roomId?: string(name='RoomId'),
    status?: int32(name='Status'),
    title?: string(name='Title'),
    whiteboardId?: string(name='WhiteboardId'),
    whiteboardRecordId?: string(name='WhiteboardRecordId'),
  }(name='Result'),
}

model CreateClassResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateClassResponseBody(name='body'),
}

async function createClassWithOptions(request: CreateClassRequest, runtime: Util.RuntimeOptions): CreateClassResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.createNickname)) {
    body['CreateNickname'] = request.createNickname;
  }
  if (!Util.isUnset(request.createUserId)) {
    body['CreateUserId'] = request.createUserId;
  }
  if (!Util.isUnset(request.title)) {
    body['Title'] = request.title;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateClass',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createClass(request: CreateClassRequest): CreateClassResponse {
  var runtime = new Util.RuntimeOptions{};
  return createClassWithOptions(request, runtime);
}

model CreateLiveRequest {
  anchorId?: string(name='AnchorId'),
  appId?: string(name='AppId'),
  codeLevel?: int32(name='CodeLevel'),
  introduction?: string(name='Introduction'),
  liveId?: string(name='LiveId'),
  roomId?: string(name='RoomId'),
  title?: string(name='Title'),
  userId?: string(name='UserId'),
}

model CreateLiveResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    liveId?: string(name='LiveId'),
  }(name='Result'),
}

model CreateLiveResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateLiveResponseBody(name='body'),
}

async function createLiveWithOptions(request: CreateLiveRequest, runtime: Util.RuntimeOptions): CreateLiveResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.anchorId)) {
    body['AnchorId'] = request.anchorId;
  }
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.codeLevel)) {
    body['CodeLevel'] = request.codeLevel;
  }
  if (!Util.isUnset(request.introduction)) {
    body['Introduction'] = request.introduction;
  }
  if (!Util.isUnset(request.liveId)) {
    body['LiveId'] = request.liveId;
  }
  if (!Util.isUnset(request.roomId)) {
    body['RoomId'] = request.roomId;
  }
  if (!Util.isUnset(request.title)) {
    body['Title'] = request.title;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateLive',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createLive(request: CreateLiveRequest): CreateLiveResponse {
  var runtime = new Util.RuntimeOptions{};
  return createLiveWithOptions(request, runtime);
}

model CreateLiveRecordSliceFileRequest {
  appId?: string(name='AppId'),
  endTime?: long(name='EndTime'),
  fileName?: string(name='FileName'),
  liveId?: string(name='LiveId'),
  startTime?: long(name='StartTime'),
}

model CreateLiveRecordSliceFileResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    sliceRecordUrl?: string(name='SliceRecordUrl'),
  }(name='Result'),
}

model CreateLiveRecordSliceFileResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateLiveRecordSliceFileResponseBody(name='body'),
}

async function createLiveRecordSliceFileWithOptions(request: CreateLiveRecordSliceFileRequest, runtime: Util.RuntimeOptions): CreateLiveRecordSliceFileResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.endTime)) {
    body['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.fileName)) {
    body['FileName'] = request.fileName;
  }
  if (!Util.isUnset(request.liveId)) {
    body['LiveId'] = request.liveId;
  }
  if (!Util.isUnset(request.startTime)) {
    body['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateLiveRecordSliceFile',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createLiveRecordSliceFile(request: CreateLiveRecordSliceFileRequest): CreateLiveRecordSliceFileResponse {
  var runtime = new Util.RuntimeOptions{};
  return createLiveRecordSliceFileWithOptions(request, runtime);
}

model CreateLiveRoomRequest {
  anchorId?: string(name='AnchorId'),
  anchorNick?: string(name='AnchorNick'),
  appId?: string(name='AppId'),
  coverUrl?: string(name='CoverUrl'),
  enableLinkMic?: boolean(name='EnableLinkMic'),
  extension?: map[string]string(name='Extension'),
  notice?: string(name='Notice'),
  title?: string(name='Title'),
  userId?: string(name='UserId'),
}

model CreateLiveRoomShrinkRequest {
  anchorId?: string(name='AnchorId'),
  anchorNick?: string(name='AnchorNick'),
  appId?: string(name='AppId'),
  coverUrl?: string(name='CoverUrl'),
  enableLinkMic?: boolean(name='EnableLinkMic'),
  extensionShrink?: string(name='Extension'),
  notice?: string(name='Notice'),
  title?: string(name='Title'),
  userId?: string(name='UserId'),
}

model CreateLiveRoomResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    anchorId?: string(name='AnchorId'),
    anchorNick?: string(name='AnchorNick'),
    appId?: string(name='AppId'),
    artcInfo?: {
      artcH5Url?: string(name='ArtcH5Url'),
      artcUrl?: string(name='ArtcUrl'),
    }(name='ArtcInfo'),
    chatId?: string(name='ChatId'),
    coverUrl?: string(name='CoverUrl'),
    extension?: map[string]string(name='Extension'),
    hlsUrl?: string(name='HlsUrl'),
    liveId?: string(name='LiveId'),
    liveUrl?: string(name='LiveUrl'),
    notice?: string(name='Notice'),
    playbackUrl?: string(name='PlaybackUrl'),
    pluginInstanceInfoList?: [ 
      {
        createTime?: long(name='CreateTime'),
        extension?: map[string]string(name='Extension'),
        pluginId?: string(name='PluginId'),
        pluginType?: string(name='PluginType'),
      }
    ](name='PluginInstanceInfoList'),
    pushUrl?: string(name='PushUrl'),
    roomId?: string(name='RoomId'),
    title?: string(name='Title'),
  }(name='Result'),
}

model CreateLiveRoomResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateLiveRoomResponseBody(name='body'),
}

async function createLiveRoomWithOptions(tmpReq: CreateLiveRoomRequest, runtime: Util.RuntimeOptions): CreateLiveRoomResponse {
  Util.validateModel(tmpReq);
  var request = new CreateLiveRoomShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.extension)) {
    request.extensionShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.extension, 'Extension', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.anchorId)) {
    body['AnchorId'] = request.anchorId;
  }
  if (!Util.isUnset(request.anchorNick)) {
    body['AnchorNick'] = request.anchorNick;
  }
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.coverUrl)) {
    body['CoverUrl'] = request.coverUrl;
  }
  if (!Util.isUnset(request.enableLinkMic)) {
    body['EnableLinkMic'] = request.enableLinkMic;
  }
  if (!Util.isUnset(request.extensionShrink)) {
    body['Extension'] = request.extensionShrink;
  }
  if (!Util.isUnset(request.notice)) {
    body['Notice'] = request.notice;
  }
  if (!Util.isUnset(request.title)) {
    body['Title'] = request.title;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateLiveRoom',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createLiveRoom(request: CreateLiveRoomRequest): CreateLiveRoomResponse {
  var runtime = new Util.RuntimeOptions{};
  return createLiveRoomWithOptions(request, runtime);
}

model CreateRoomRequest {
  appId?: string(name='AppId'),
  extension?: map[string]string(name='Extension'),
  notice?: string(name='Notice'),
  roomId?: string(name='RoomId'),
  roomOwnerId?: string(name='RoomOwnerId'),
  templateId?: string(name='TemplateId'),
  title?: string(name='Title'),
}

model CreateRoomShrinkRequest {
  appId?: string(name='AppId'),
  extensionShrink?: string(name='Extension'),
  notice?: string(name='Notice'),
  roomId?: string(name='RoomId'),
  roomOwnerId?: string(name='RoomOwnerId'),
  templateId?: string(name='TemplateId'),
  title?: string(name='Title'),
}

model CreateRoomResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    roomId?: string(name='RoomId'),
  }(name='Result'),
}

model CreateRoomResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateRoomResponseBody(name='body'),
}

async function createRoomWithOptions(tmpReq: CreateRoomRequest, runtime: Util.RuntimeOptions): CreateRoomResponse {
  Util.validateModel(tmpReq);
  var request = new CreateRoomShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.extension)) {
    request.extensionShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.extension, 'Extension', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.extensionShrink)) {
    body['Extension'] = request.extensionShrink;
  }
  if (!Util.isUnset(request.notice)) {
    body['Notice'] = request.notice;
  }
  if (!Util.isUnset(request.roomId)) {
    body['RoomId'] = request.roomId;
  }
  if (!Util.isUnset(request.roomOwnerId)) {
    body['RoomOwnerId'] = request.roomOwnerId;
  }
  if (!Util.isUnset(request.templateId)) {
    body['TemplateId'] = request.templateId;
  }
  if (!Util.isUnset(request.title)) {
    body['Title'] = request.title;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateRoom',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createRoom(request: CreateRoomRequest): CreateRoomResponse {
  var runtime = new Util.RuntimeOptions{};
  return createRoomWithOptions(request, runtime);
}

model CreateSensitiveWordRequest {
  appId?: string(name='AppId'),
  wordList?: [ string ](name='WordList'),
}

model CreateSensitiveWordShrinkRequest {
  appId?: string(name='AppId'),
  wordListShrink?: string(name='WordList'),
}

model CreateSensitiveWordResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    success?: boolean(name='Success'),
  }(name='Result'),
}

model CreateSensitiveWordResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: CreateSensitiveWordResponseBody(name='body'),
}

async function createSensitiveWordWithOptions(tmpReq: CreateSensitiveWordRequest, runtime: Util.RuntimeOptions): CreateSensitiveWordResponse {
  Util.validateModel(tmpReq);
  var request = new CreateSensitiveWordShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.wordList)) {
    request.wordListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.wordList, 'WordList', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.wordListShrink)) {
    body['WordList'] = request.wordListShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateSensitiveWord',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function createSensitiveWord(request: CreateSensitiveWordRequest): CreateSensitiveWordResponse {
  var runtime = new Util.RuntimeOptions{};
  return createSensitiveWordWithOptions(request, runtime);
}

model DeleteClassRequest {
  appId?: string(name='AppId'),
  classId?: string(name='ClassId'),
  userId?: string(name='UserId'),
}

model DeleteClassResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteClassResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteClassResponseBody(name='body'),
}

async function deleteClassWithOptions(request: DeleteClassRequest, runtime: Util.RuntimeOptions): DeleteClassResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.classId)) {
    body['ClassId'] = request.classId;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteClass',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteClass(request: DeleteClassRequest): DeleteClassResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteClassWithOptions(request, runtime);
}

model DeleteCommentRequest {
  appId?: string(name='AppId'),
  commentIdList?: [ string ](name='CommentIdList'),
  roomId?: string(name='RoomId'),
  userId?: string(name='UserId'),
}

model DeleteCommentResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    deleteResult?: boolean(name='DeleteResult'),
  }(name='Result'),
}

model DeleteCommentResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteCommentResponseBody(name='body'),
}

async function deleteCommentWithOptions(request: DeleteCommentRequest, runtime: Util.RuntimeOptions): DeleteCommentResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  var bodyFlat : map[string]any = {};
  if (!Util.isUnset(request.commentIdList)) {
    bodyFlat['CommentIdList'] = request.commentIdList;
  }
  if (!Util.isUnset(request.roomId)) {
    body['RoomId'] = request.roomId;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteComment',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteComment(request: DeleteCommentRequest): DeleteCommentResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteCommentWithOptions(request, runtime);
}

model DeleteCommentByCreatorIdRequest {
  appId?: string(name='AppId'),
  commentIdList?: [ string ](name='CommentIdList'),
  creatorId?: string(name='CreatorId'),
  roomId?: string(name='RoomId'),
  userId?: string(name='UserId'),
}

model DeleteCommentByCreatorIdResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    deleteResult?: boolean(name='DeleteResult'),
  }(name='Result'),
}

model DeleteCommentByCreatorIdResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteCommentByCreatorIdResponseBody(name='body'),
}

async function deleteCommentByCreatorIdWithOptions(request: DeleteCommentByCreatorIdRequest, runtime: Util.RuntimeOptions): DeleteCommentByCreatorIdResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  var bodyFlat : map[string]any = {};
  if (!Util.isUnset(request.commentIdList)) {
    bodyFlat['CommentIdList'] = request.commentIdList;
  }
  if (!Util.isUnset(request.creatorId)) {
    body['CreatorId'] = request.creatorId;
  }
  if (!Util.isUnset(request.roomId)) {
    body['RoomId'] = request.roomId;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteCommentByCreatorId',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteCommentByCreatorId(request: DeleteCommentByCreatorIdRequest): DeleteCommentByCreatorIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteCommentByCreatorIdWithOptions(request, runtime);
}

model DeleteConferenceRequest {
  appId?: string(name='AppId'),
  conferenceId?: string(name='ConferenceId'),
  roomId?: string(name='RoomId'),
  userId?: string(name='UserId'),
}

model DeleteConferenceResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteConferenceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteConferenceResponseBody(name='body'),
}

async function deleteConferenceWithOptions(request: DeleteConferenceRequest, runtime: Util.RuntimeOptions): DeleteConferenceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.conferenceId)) {
    body['ConferenceId'] = request.conferenceId;
  }
  if (!Util.isUnset(request.roomId)) {
    body['RoomId'] = request.roomId;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteConference',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteConference(request: DeleteConferenceRequest): DeleteConferenceResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteConferenceWithOptions(request, runtime);
}

model DeleteLiveRequest {
  liveId?: string(name='LiveId'),
}

model DeleteLiveResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteLiveResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteLiveResponseBody(name='body'),
}

async function deleteLiveWithOptions(request: DeleteLiveRequest, runtime: Util.RuntimeOptions): DeleteLiveResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.liveId)) {
    body['LiveId'] = request.liveId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteLive',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteLive(request: DeleteLiveRequest): DeleteLiveResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteLiveWithOptions(request, runtime);
}

model DeleteLiveFilesByIdRequest {
  appId?: string(name='AppId'),
  liveId?: string(name='LiveId'),
}

model DeleteLiveFilesByIdResponseBody = {
  requestId?: string(name='RequestId'),
  result?: boolean(name='Result'),
}

model DeleteLiveFilesByIdResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteLiveFilesByIdResponseBody(name='body'),
}

async function deleteLiveFilesByIdWithOptions(request: DeleteLiveFilesByIdRequest, runtime: Util.RuntimeOptions): DeleteLiveFilesByIdResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.liveId)) {
    body['LiveId'] = request.liveId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteLiveFilesById',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteLiveFilesById(request: DeleteLiveFilesByIdRequest): DeleteLiveFilesByIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteLiveFilesByIdWithOptions(request, runtime);
}

model DeleteLiveRoomRequest {
  appId?: string(name='AppId'),
  liveId?: string(name='LiveId'),
  userId?: string(name='UserId'),
}

model DeleteLiveRoomResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteLiveRoomResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteLiveRoomResponseBody(name='body'),
}

async function deleteLiveRoomWithOptions(request: DeleteLiveRoomRequest, runtime: Util.RuntimeOptions): DeleteLiveRoomResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.liveId)) {
    body['LiveId'] = request.liveId;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteLiveRoom',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteLiveRoom(request: DeleteLiveRoomRequest): DeleteLiveRoomResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteLiveRoomWithOptions(request, runtime);
}

model DeleteRoomRequest {
  appId?: string(name='AppId'),
  roomId?: string(name='RoomId'),
}

model DeleteRoomResponseBody = {
  requestId?: string(name='RequestId'),
}

model DeleteRoomResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteRoomResponseBody(name='body'),
}

async function deleteRoomWithOptions(request: DeleteRoomRequest, runtime: Util.RuntimeOptions): DeleteRoomResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.roomId)) {
    body['RoomId'] = request.roomId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteRoom',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteRoom(request: DeleteRoomRequest): DeleteRoomResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteRoomWithOptions(request, runtime);
}

model DeleteSensitiveWordRequest {
  appId?: string(name='AppId'),
  wordList?: [ string ](name='WordList'),
}

model DeleteSensitiveWordShrinkRequest {
  appId?: string(name='AppId'),
  wordListShrink?: string(name='WordList'),
}

model DeleteSensitiveWordResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    success?: boolean(name='Success'),
  }(name='Result'),
}

model DeleteSensitiveWordResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DeleteSensitiveWordResponseBody(name='body'),
}

async function deleteSensitiveWordWithOptions(tmpReq: DeleteSensitiveWordRequest, runtime: Util.RuntimeOptions): DeleteSensitiveWordResponse {
  Util.validateModel(tmpReq);
  var request = new DeleteSensitiveWordShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.wordList)) {
    request.wordListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.wordList, 'WordList', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.wordListShrink)) {
    body['WordList'] = request.wordListShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteSensitiveWord',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function deleteSensitiveWord(request: DeleteSensitiveWordRequest): DeleteSensitiveWordResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteSensitiveWordWithOptions(request, runtime);
}

model DescribeMeterImpPlayBackTimeByLiveIdRequest {
  appId?: string(name='AppId'),
  endTs?: long(name='EndTs'),
  liveId?: string(name='LiveId'),
  startTs?: long(name='StartTs'),
}

model DescribeMeterImpPlayBackTimeByLiveIdResponseBody = {
  data?: [ 
    {
      watchTime?: long(name='WatchTime'),
    }
  ](name='Data'),
  requestId?: string(name='RequestId'),
}

model DescribeMeterImpPlayBackTimeByLiveIdResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeMeterImpPlayBackTimeByLiveIdResponseBody(name='body'),
}

async function describeMeterImpPlayBackTimeByLiveIdWithOptions(request: DescribeMeterImpPlayBackTimeByLiveIdRequest, runtime: Util.RuntimeOptions): DescribeMeterImpPlayBackTimeByLiveIdResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.endTs)) {
    query['EndTs'] = request.endTs;
  }
  if (!Util.isUnset(request.liveId)) {
    query['LiveId'] = request.liveId;
  }
  if (!Util.isUnset(request.startTs)) {
    query['StartTs'] = request.startTs;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeMeterImpPlayBackTimeByLiveId',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeMeterImpPlayBackTimeByLiveId(request: DescribeMeterImpPlayBackTimeByLiveIdRequest): DescribeMeterImpPlayBackTimeByLiveIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeMeterImpPlayBackTimeByLiveIdWithOptions(request, runtime);
}

model DescribeMeterImpWatchLiveTimeByLiveIdRequest {
  appId?: string(name='AppId'),
  liveId?: string(name='LiveId'),
}

model DescribeMeterImpWatchLiveTimeByLiveIdResponseBody = {
  data?: [ 
    {
      watchTimeInLatency?: long(name='WatchTimeInLatency'),
      watchTimeInLowLatency?: long(name='WatchTimeInLowLatency'),
    }
  ](name='Data'),
  requestId?: string(name='RequestId'),
}

model DescribeMeterImpWatchLiveTimeByLiveIdResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: DescribeMeterImpWatchLiveTimeByLiveIdResponseBody(name='body'),
}

async function describeMeterImpWatchLiveTimeByLiveIdWithOptions(request: DescribeMeterImpWatchLiveTimeByLiveIdRequest, runtime: Util.RuntimeOptions): DescribeMeterImpWatchLiveTimeByLiveIdResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.liveId)) {
    query['LiveId'] = request.liveId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeMeterImpWatchLiveTimeByLiveId',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeMeterImpWatchLiveTimeByLiveId(request: DescribeMeterImpWatchLiveTimeByLiveIdRequest): DescribeMeterImpWatchLiveTimeByLiveIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeMeterImpWatchLiveTimeByLiveIdWithOptions(request, runtime);
}

model GetAuthTokenRequest {
  appId?: string(name='AppId'),
  appKey?: string(name='AppKey'),
  deviceId?: string(name='DeviceId'),
  userId?: string(name='UserId'),
}

model GetAuthTokenResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    accessToken?: string(name='AccessToken'),
    accessTokenExpiredTime?: long(name='AccessTokenExpiredTime'),
    refreshToken?: string(name='RefreshToken'),
  }(name='Result'),
}

model GetAuthTokenResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetAuthTokenResponseBody(name='body'),
}

async function getAuthTokenWithOptions(request: GetAuthTokenRequest, runtime: Util.RuntimeOptions): GetAuthTokenResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.appKey)) {
    body['AppKey'] = request.appKey;
  }
  if (!Util.isUnset(request.deviceId)) {
    body['DeviceId'] = request.deviceId;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetAuthToken',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getAuthToken(request: GetAuthTokenRequest): GetAuthTokenResponse {
  var runtime = new Util.RuntimeOptions{};
  return getAuthTokenWithOptions(request, runtime);
}

model GetClassDetailRequest {
  appId?: string(name='AppId'),
  classId?: string(name='ClassId'),
  userId?: string(name='UserId'),
}

model GetClassDetailResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    classId?: string(name='ClassId'),
    confId?: string(name='ConfId'),
    createNickname?: string(name='CreateNickname'),
    createUserId?: string(name='CreateUserId'),
    endTime?: long(name='EndTime'),
    liveId?: string(name='LiveId'),
    roomId?: string(name='RoomId'),
    startTime?: long(name='StartTime'),
    status?: int32(name='Status'),
    title?: string(name='Title'),
    whiteboardId?: string(name='WhiteboardId'),
    whiteboardRecordId?: string(name='WhiteboardRecordId'),
  }(name='Result'),
}

model GetClassDetailResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetClassDetailResponseBody(name='body'),
}

async function getClassDetailWithOptions(request: GetClassDetailRequest, runtime: Util.RuntimeOptions): GetClassDetailResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.classId)) {
    body['ClassId'] = request.classId;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetClassDetail',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getClassDetail(request: GetClassDetailRequest): GetClassDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return getClassDetailWithOptions(request, runtime);
}

model GetClassRecordRequest {
  appId?: string(name='AppId'),
  classId?: string(name='ClassId'),
  userId?: string(name='UserId'),
}

model GetClassRecordResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    playbackUrlMap?: map[string][ string ](name='PlaybackUrlMap'),
  }(name='Result'),
}

model GetClassRecordResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetClassRecordResponseBody(name='body'),
}

async function getClassRecordWithOptions(request: GetClassRecordRequest, runtime: Util.RuntimeOptions): GetClassRecordResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.classId)) {
    body['ClassId'] = request.classId;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetClassRecord',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getClassRecord(request: GetClassRecordRequest): GetClassRecordResponse {
  var runtime = new Util.RuntimeOptions{};
  return getClassRecordWithOptions(request, runtime);
}

model GetConferenceRequest {
  conferenceId?: string(name='ConferenceId'),
}

model GetConferenceResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    appId?: string(name='AppId'),
    conferenceId?: string(name='ConferenceId'),
    createTime?: long(name='CreateTime'),
    playbackUrl?: string(name='PlaybackUrl'),
    roomId?: string(name='RoomId'),
    status?: string(name='Status'),
    title?: string(name='Title'),
    userId?: string(name='UserId'),
  }(name='Result'),
}

model GetConferenceResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetConferenceResponseBody(name='body'),
}

async function getConferenceWithOptions(request: GetConferenceRequest, runtime: Util.RuntimeOptions): GetConferenceResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.conferenceId)) {
    body['ConferenceId'] = request.conferenceId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetConference',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getConference(request: GetConferenceRequest): GetConferenceResponse {
  var runtime = new Util.RuntimeOptions{};
  return getConferenceWithOptions(request, runtime);
}

model GetLiveRequest {
  liveId?: string(name='LiveId'),
}

model GetLiveResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    anchorId?: string(name='AnchorId'),
    appId?: string(name='AppId'),
    artcInfo?: {
      artcH5Url?: string(name='ArtcH5Url'),
      artcUrl?: string(name='ArtcUrl'),
    }(name='ArtcInfo'),
    codeLevel?: int32(name='CodeLevel'),
    coverUrl?: string(name='CoverUrl'),
    createTime?: long(name='CreateTime'),
    duration?: long(name='Duration'),
    endTime?: long(name='EndTime'),
    hlsUrl?: string(name='HlsUrl'),
    introduction?: string(name='Introduction'),
    liveId?: string(name='LiveId'),
    liveUrl?: string(name='LiveUrl'),
    playUrlInfoList?: [ 
      {
        codeLevel?: int32(name='CodeLevel'),
        flvUrl?: string(name='FlvUrl'),
        hlsUrl?: string(name='HlsUrl'),
        rtmpUrl?: string(name='RtmpUrl'),
      }
    ](name='PlayUrlInfoList'),
    playbackUrl?: string(name='PlaybackUrl'),
    pushUrl?: string(name='PushUrl'),
    roomId?: string(name='RoomId'),
    status?: string(name='Status'),
    title?: string(name='Title'),
    userDefineField?: string(name='UserDefineField'),
    userId?: string(name='UserId'),
  }(name='Result'),
}

model GetLiveResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetLiveResponseBody(name='body'),
}

async function getLiveWithOptions(request: GetLiveRequest, runtime: Util.RuntimeOptions): GetLiveResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.liveId)) {
    body['LiveId'] = request.liveId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetLive',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getLive(request: GetLiveRequest): GetLiveResponse {
  var runtime = new Util.RuntimeOptions{};
  return getLiveWithOptions(request, runtime);
}

model GetLiveRecordRequest {
  appId?: string(name='AppId'),
  liveId?: string(name='LiveId'),
  userId?: string(name='UserId'),
}

model GetLiveRecordResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    playbackUrlMap?: map[string][ string ](name='PlaybackUrlMap'),
  }(name='Result'),
}

model GetLiveRecordResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetLiveRecordResponseBody(name='body'),
}

async function getLiveRecordWithOptions(request: GetLiveRecordRequest, runtime: Util.RuntimeOptions): GetLiveRecordResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.liveId)) {
    body['LiveId'] = request.liveId;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetLiveRecord',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getLiveRecord(request: GetLiveRecordRequest): GetLiveRecordResponse {
  var runtime = new Util.RuntimeOptions{};
  return getLiveRecordWithOptions(request, runtime);
}

model GetLiveRoomRequest {
  appId?: string(name='AppId'),
  liveId?: string(name='LiveId'),
}

model GetLiveRoomResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    anchorId?: string(name='AnchorId'),
    anchorNick?: string(name='AnchorNick'),
    appId?: string(name='AppId'),
    artcInfo?: {
      artcH5Url?: string(name='ArtcH5Url'),
      artcUrl?: string(name='ArtcUrl'),
    }(name='ArtcInfo'),
    chatId?: string(name='ChatId'),
    confId?: string(name='ConfId'),
    coverUrl?: string(name='CoverUrl'),
    createTime?: long(name='CreateTime'),
    enableLinkMic?: boolean(name='EnableLinkMic'),
    endTime?: long(name='EndTime'),
    extension?: map[string]string(name='Extension'),
    hlsUrl?: string(name='HlsUrl'),
    hlsUrlHttps?: string(name='HlsUrlHttps'),
    liveId?: string(name='LiveId'),
    liveUrl?: string(name='LiveUrl'),
    liveUrlHttps?: string(name='LiveUrlHttps'),
    notice?: string(name='Notice'),
    onlineCount?: long(name='OnlineCount'),
    playbackUrl?: string(name='PlaybackUrl'),
    playbackUrlHttps?: string(name='PlaybackUrlHttps'),
    pluginInstanceInfoList?: [ 
      {
        createTime?: long(name='CreateTime'),
        extension?: map[string]string(name='Extension'),
        pluginId?: string(name='PluginId'),
        pluginType?: string(name='PluginType'),
      }
    ](name='PluginInstanceInfoList'),
    pushUrl?: string(name='PushUrl'),
    pv?: long(name='Pv'),
    roomId?: string(name='RoomId'),
    rtmpUrl?: string(name='RtmpUrl'),
    startTime?: long(name='StartTime'),
    status?: int32(name='Status'),
    title?: string(name='Title'),
    uv?: long(name='Uv'),
  }(name='Result'),
}

model GetLiveRoomResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetLiveRoomResponseBody(name='body'),
}

async function getLiveRoomWithOptions(request: GetLiveRoomRequest, runtime: Util.RuntimeOptions): GetLiveRoomResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.liveId)) {
    body['LiveId'] = request.liveId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetLiveRoom',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getLiveRoom(request: GetLiveRoomRequest): GetLiveRoomResponse {
  var runtime = new Util.RuntimeOptions{};
  return getLiveRoomWithOptions(request, runtime);
}

model GetLiveRoomStatisticsRequest {
  appId?: string(name='AppId'),
  liveId?: string(name='LiveId'),
}

model GetLiveRoomStatisticsResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    endTime?: long(name='EndTime'),
    likeCount?: long(name='LikeCount'),
    liveId?: string(name='LiveId'),
    messageCount?: long(name='MessageCount'),
    onlineCount?: long(name='OnlineCount'),
    pv?: long(name='Pv'),
    startTime?: long(name='StartTime'),
    status?: int32(name='Status'),
    uv?: long(name='Uv'),
    watchLiveTime?: long(name='WatchLiveTime'),
  }(name='Result'),
}

model GetLiveRoomStatisticsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetLiveRoomStatisticsResponseBody(name='body'),
}

async function getLiveRoomStatisticsWithOptions(request: GetLiveRoomStatisticsRequest, runtime: Util.RuntimeOptions): GetLiveRoomStatisticsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.liveId)) {
    body['LiveId'] = request.liveId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetLiveRoomStatistics',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getLiveRoomStatistics(request: GetLiveRoomStatisticsRequest): GetLiveRoomStatisticsResponse {
  var runtime = new Util.RuntimeOptions{};
  return getLiveRoomStatisticsWithOptions(request, runtime);
}

model GetLiveRoomUserStatisticsRequest {
  appId?: string(name='AppId'),
  liveId?: string(name='LiveId'),
  pageNumber?: string(name='PageNumber'),
  pageSize?: string(name='PageSize'),
}

model GetLiveRoomUserStatisticsResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    hasMore?: boolean(name='HasMore'),
    liveId?: string(name='LiveId'),
    pageTotal?: int32(name='PageTotal'),
    totalCount?: int32(name='TotalCount'),
    userStatisticsList?: [ 
      {
        commentCount?: int32(name='CommentCount'),
        likeCount?: int32(name='LikeCount'),
        userId?: string(name='UserId'),
        watchLiveTime?: long(name='WatchLiveTime'),
      }
    ](name='UserStatisticsList'),
  }(name='Result'),
}

model GetLiveRoomUserStatisticsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetLiveRoomUserStatisticsResponseBody(name='body'),
}

async function getLiveRoomUserStatisticsWithOptions(request: GetLiveRoomUserStatisticsRequest, runtime: Util.RuntimeOptions): GetLiveRoomUserStatisticsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.liveId)) {
    body['LiveId'] = request.liveId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetLiveRoomUserStatistics',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getLiveRoomUserStatistics(request: GetLiveRoomUserStatisticsRequest): GetLiveRoomUserStatisticsResponse {
  var runtime = new Util.RuntimeOptions{};
  return getLiveRoomUserStatisticsWithOptions(request, runtime);
}

model GetRoomRequest {
  appId?: string(name='AppId'),
  roomId?: string(name='RoomId'),
}

model GetRoomResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    roomInfo?: {
      adminIdList?: [ string ](name='AdminIdList'),
      appId?: string(name='AppId'),
      createTime?: long(name='CreateTime'),
      extension?: map[string]string(name='Extension'),
      notice?: string(name='Notice'),
      onlineCount?: long(name='OnlineCount'),
      pluginInstanceInfoList?: [ 
        {
          createTime?: long(name='CreateTime'),
          extension?: map[string]string(name='Extension'),
          pluginId?: string(name='PluginId'),
          pluginType?: string(name='PluginType'),
        }
      ](name='PluginInstanceInfoList'),
      pv?: long(name='Pv'),
      roomId?: string(name='RoomId'),
      roomOwnerId?: string(name='RoomOwnerId'),
      templateId?: string(name='TemplateId'),
      title?: string(name='Title'),
      uv?: long(name='Uv'),
    }(name='RoomInfo'),
  }(name='Result'),
}

model GetRoomResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetRoomResponseBody(name='body'),
}

async function getRoomWithOptions(request: GetRoomRequest, runtime: Util.RuntimeOptions): GetRoomResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.roomId)) {
    body['RoomId'] = request.roomId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetRoom',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getRoom(request: GetRoomRequest): GetRoomResponse {
  var runtime = new Util.RuntimeOptions{};
  return getRoomWithOptions(request, runtime);
}

model GetStandardRoomJumpUrlRequest {
  appId?: string(name='AppId'),
  appKey?: string(name='AppKey'),
  bizId?: string(name='BizId'),
  bizType?: string(name='BizType'),
  platform?: string(name='Platform'),
  userId?: string(name='UserId'),
  userNick?: string(name='UserNick'),
}

model GetStandardRoomJumpUrlResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    standardRoomJumpUrl?: string(name='StandardRoomJumpUrl'),
  }(name='Result'),
}

model GetStandardRoomJumpUrlResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: GetStandardRoomJumpUrlResponseBody(name='body'),
}

async function getStandardRoomJumpUrlWithOptions(request: GetStandardRoomJumpUrlRequest, runtime: Util.RuntimeOptions): GetStandardRoomJumpUrlResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.appKey)) {
    body['AppKey'] = request.appKey;
  }
  if (!Util.isUnset(request.bizId)) {
    body['BizId'] = request.bizId;
  }
  if (!Util.isUnset(request.bizType)) {
    body['BizType'] = request.bizType;
  }
  if (!Util.isUnset(request.platform)) {
    body['Platform'] = request.platform;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  if (!Util.isUnset(request.userNick)) {
    body['UserNick'] = request.userNick;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetStandardRoomJumpUrl',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function getStandardRoomJumpUrl(request: GetStandardRoomJumpUrlRequest): GetStandardRoomJumpUrlResponse {
  var runtime = new Util.RuntimeOptions{};
  return getStandardRoomJumpUrlWithOptions(request, runtime);
}

model KickRoomUserRequest {
  appId?: string(name='AppId'),
  blockTime?: long(name='BlockTime'),
  kickUser?: string(name='KickUser'),
  roomId?: string(name='RoomId'),
  userId?: string(name='UserId'),
}

model KickRoomUserResponseBody = {
  requestId?: string(name='RequestId'),
}

model KickRoomUserResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: KickRoomUserResponseBody(name='body'),
}

async function kickRoomUserWithOptions(request: KickRoomUserRequest, runtime: Util.RuntimeOptions): KickRoomUserResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.blockTime)) {
    body['BlockTime'] = request.blockTime;
  }
  if (!Util.isUnset(request.kickUser)) {
    body['KickUser'] = request.kickUser;
  }
  if (!Util.isUnset(request.roomId)) {
    body['RoomId'] = request.roomId;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'KickRoomUser',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function kickRoomUser(request: KickRoomUserRequest): KickRoomUserResponse {
  var runtime = new Util.RuntimeOptions{};
  return kickRoomUserWithOptions(request, runtime);
}

model ListClassesRequest {
  appId?: string(name='AppId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  status?: int32(name='Status'),
}

model ListClassesResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    classList?: [ 
      {
        classId?: string(name='ClassId'),
        confId?: string(name='ConfId'),
        createNickname?: string(name='CreateNickname'),
        createUserId?: string(name='CreateUserId'),
        endTime?: long(name='EndTime'),
        liveId?: string(name='LiveId'),
        roomId?: string(name='RoomId'),
        startTime?: long(name='StartTime'),
        status?: int32(name='Status'),
        title?: string(name='Title'),
        whiteboardId?: string(name='WhiteboardId'),
        whiteboardRecordId?: string(name='WhiteboardRecordId'),
      }
    ](name='ClassList'),
    hasMore?: boolean(name='HasMore'),
    pageTotal?: int32(name='PageTotal'),
    totalCount?: int32(name='TotalCount'),
  }(name='Result'),
}

model ListClassesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListClassesResponseBody(name='body'),
}

async function listClassesWithOptions(request: ListClassesRequest, runtime: Util.RuntimeOptions): ListClassesResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.status)) {
    body['Status'] = request.status;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListClasses',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listClasses(request: ListClassesRequest): ListClassesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listClassesWithOptions(request, runtime);
}

model ListCommentsRequest {
  appId?: string(name='AppId'),
  creatorId?: string(name='CreatorId'),
  pageNum?: int32(name='PageNum'),
  pageSize?: int32(name='PageSize'),
  roomId?: string(name='RoomId'),
  sortType?: int32(name='SortType'),
  userId?: string(name='UserId'),
}

model ListCommentsResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    commentVOList?: [ 
      {
        appId?: string(name='AppId'),
        commentId?: string(name='CommentId'),
        content?: string(name='Content'),
        createAt?: long(name='CreateAt'),
        extension?: map[string]string(name='Extension'),
        roomId?: string(name='RoomId'),
        senderId?: string(name='SenderId'),
        senderNick?: string(name='SenderNick'),
      }
    ](name='CommentVOList'),
    hasMore?: boolean(name='HasMore'),
    pageTotal?: int32(name='PageTotal'),
    totalCount?: int32(name='TotalCount'),
  }(name='Result'),
}

model ListCommentsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListCommentsResponseBody(name='body'),
}

async function listCommentsWithOptions(request: ListCommentsRequest, runtime: Util.RuntimeOptions): ListCommentsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.creatorId)) {
    body['CreatorId'] = request.creatorId;
  }
  if (!Util.isUnset(request.pageNum)) {
    body['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.roomId)) {
    body['RoomId'] = request.roomId;
  }
  if (!Util.isUnset(request.sortType)) {
    body['SortType'] = request.sortType;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListComments',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listComments(request: ListCommentsRequest): ListCommentsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listCommentsWithOptions(request, runtime);
}

model ListConferenceUsersRequest {
  conferenceId?: string(name='ConferenceId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
}

model ListConferenceUsersResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    conferenceUserList?: [ 
      {
        status?: string(name='Status'),
        userId?: string(name='UserId'),
      }
    ](name='ConferenceUserList'),
    hasMore?: boolean(name='HasMore'),
    pageTotal?: int32(name='PageTotal'),
    totalCount?: int32(name='TotalCount'),
  }(name='Result'),
}

model ListConferenceUsersResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListConferenceUsersResponseBody(name='body'),
}

async function listConferenceUsersWithOptions(request: ListConferenceUsersRequest, runtime: Util.RuntimeOptions): ListConferenceUsersResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.conferenceId)) {
    body['ConferenceId'] = request.conferenceId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListConferenceUsers',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listConferenceUsers(request: ListConferenceUsersRequest): ListConferenceUsersResponse {
  var runtime = new Util.RuntimeOptions{};
  return listConferenceUsersWithOptions(request, runtime);
}

model ListLiveFilesRequest {
  appId?: string(name='AppId'),
  liveId?: string(name='LiveId'),
}

model ListLiveFilesResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    fileList?: [ 
      {
        fileName?: string(name='FileName'),
        url?: string(name='Url'),
      }
    ](name='FileList'),
  }(name='Result'),
}

model ListLiveFilesResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListLiveFilesResponseBody(name='body'),
}

async function listLiveFilesWithOptions(request: ListLiveFilesRequest, runtime: Util.RuntimeOptions): ListLiveFilesResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.liveId)) {
    body['LiveId'] = request.liveId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListLiveFiles',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listLiveFiles(request: ListLiveFilesRequest): ListLiveFilesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listLiveFilesWithOptions(request, runtime);
}

model ListLiveRoomsRequest {
  appId?: string(name='AppId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  status?: int32(name='Status'),
}

model ListLiveRoomsResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    hasMore?: boolean(name='HasMore'),
    liveList?: [ 
      {
        anchorId?: string(name='AnchorId'),
        anchorNick?: string(name='AnchorNick'),
        appId?: string(name='AppId'),
        chatId?: string(name='ChatId'),
        coverUrl?: string(name='CoverUrl'),
        createTime?: long(name='CreateTime'),
        endTime?: long(name='EndTime'),
        extension?: map[string]string(name='Extension'),
        liveId?: string(name='LiveId'),
        notice?: string(name='Notice'),
        onlineCount?: long(name='OnlineCount'),
        pv?: long(name='Pv'),
        roomId?: string(name='RoomId'),
        startTime?: long(name='StartTime'),
        status?: int32(name='Status'),
        title?: string(name='Title'),
        uv?: long(name='Uv'),
      }
    ](name='LiveList'),
    pageTotal?: int32(name='PageTotal'),
    totalCount?: int32(name='TotalCount'),
  }(name='Result'),
}

model ListLiveRoomsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListLiveRoomsResponseBody(name='body'),
}

async function listLiveRoomsWithOptions(request: ListLiveRoomsRequest, runtime: Util.RuntimeOptions): ListLiveRoomsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.status)) {
    body['Status'] = request.status;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListLiveRooms',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listLiveRooms(request: ListLiveRoomsRequest): ListLiveRoomsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listLiveRoomsWithOptions(request, runtime);
}

model ListLiveRoomsByIdRequest {
  appId?: string(name='AppId'),
  liveIdList?: [ string ](name='LiveIdList'),
}

model ListLiveRoomsByIdShrinkRequest {
  appId?: string(name='AppId'),
  liveIdListShrink?: string(name='LiveIdList'),
}

model ListLiveRoomsByIdResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    liveList?: [ 
      {
        anchorId?: string(name='AnchorId'),
        anchorNick?: string(name='AnchorNick'),
        appId?: string(name='AppId'),
        chatId?: string(name='ChatId'),
        coverUrl?: string(name='CoverUrl'),
        createTime?: long(name='CreateTime'),
        endTime?: long(name='EndTime'),
        extension?: map[string]string(name='Extension'),
        liveId?: string(name='LiveId'),
        notice?: string(name='Notice'),
        onlineCount?: long(name='OnlineCount'),
        pv?: long(name='Pv'),
        roomId?: string(name='RoomId'),
        startTime?: long(name='StartTime'),
        status?: int32(name='Status'),
        title?: string(name='Title'),
        uv?: long(name='Uv'),
      }
    ](name='LiveList'),
  }(name='Result'),
}

model ListLiveRoomsByIdResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListLiveRoomsByIdResponseBody(name='body'),
}

async function listLiveRoomsByIdWithOptions(tmpReq: ListLiveRoomsByIdRequest, runtime: Util.RuntimeOptions): ListLiveRoomsByIdResponse {
  Util.validateModel(tmpReq);
  var request = new ListLiveRoomsByIdShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.liveIdList)) {
    request.liveIdListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.liveIdList, 'LiveIdList', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.liveIdListShrink)) {
    body['LiveIdList'] = request.liveIdListShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListLiveRoomsById',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listLiveRoomsById(request: ListLiveRoomsByIdRequest): ListLiveRoomsByIdResponse {
  var runtime = new Util.RuntimeOptions{};
  return listLiveRoomsByIdWithOptions(request, runtime);
}

model ListRoomUsersRequest {
  appId?: string(name='AppId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
  roomId?: string(name='RoomId'),
}

model ListRoomUsersResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    hasMore?: boolean(name='HasMore'),
    pageTotal?: int32(name='PageTotal'),
    roomUserList?: [ 
      {
        extension?: map[string]string(name='Extension'),
        nick?: string(name='Nick'),
        userId?: string(name='UserId'),
      }
    ](name='RoomUserList'),
    totalCount?: int32(name='TotalCount'),
  }(name='Result'),
}

model ListRoomUsersResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListRoomUsersResponseBody(name='body'),
}

async function listRoomUsersWithOptions(request: ListRoomUsersRequest, runtime: Util.RuntimeOptions): ListRoomUsersResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.roomId)) {
    body['RoomId'] = request.roomId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListRoomUsers',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listRoomUsers(request: ListRoomUsersRequest): ListRoomUsersResponse {
  var runtime = new Util.RuntimeOptions{};
  return listRoomUsersWithOptions(request, runtime);
}

model ListRoomsRequest {
  appId?: string(name='AppId'),
  pageNumber?: int32(name='PageNumber'),
  pageSize?: int32(name='PageSize'),
}

model ListRoomsResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    hasMore?: boolean(name='HasMore'),
    pageTotal?: int32(name='PageTotal'),
    roomInfoList?: [ 
      {
        appId?: string(name='AppId'),
        createTime?: string(name='CreateTime'),
        extension?: map[string]string(name='Extension'),
        notice?: string(name='Notice'),
        onlineCount?: long(name='OnlineCount'),
        pluginInstanceInfoList?: [ 
          {
            createTime?: long(name='CreateTime'),
            extension?: map[string]string(name='Extension'),
            pluginId?: string(name='PluginId'),
            pluginType?: string(name='PluginType'),
          }
        ](name='PluginInstanceInfoList'),
        roomId?: string(name='RoomId'),
        roomOwnerId?: string(name='RoomOwnerId'),
        templateId?: string(name='TemplateId'),
        title?: string(name='Title'),
        uv?: long(name='Uv'),
      }
    ](name='RoomInfoList'),
    totalCount?: int32(name='TotalCount'),
  }(name='Result'),
}

model ListRoomsResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListRoomsResponseBody(name='body'),
}

async function listRoomsWithOptions(request: ListRoomsRequest, runtime: Util.RuntimeOptions): ListRoomsResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.pageNumber)) {
    body['PageNumber'] = request.pageNumber;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListRooms',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listRooms(request: ListRoomsRequest): ListRoomsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listRoomsWithOptions(request, runtime);
}

model ListSensitiveWordRequest {
  appId?: string(name='AppId'),
  pageNum?: int32(name='PageNum'),
  pageSize?: int32(name='PageSize'),
}

model ListSensitiveWordResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    totalCount?: int32(name='TotalCount'),
    wordList?: [ string ](name='WordList'),
  }(name='Result'),
}

model ListSensitiveWordResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: ListSensitiveWordResponseBody(name='body'),
}

async function listSensitiveWordWithOptions(request: ListSensitiveWordRequest, runtime: Util.RuntimeOptions): ListSensitiveWordResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.pageNum)) {
    body['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListSensitiveWord',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function listSensitiveWord(request: ListSensitiveWordRequest): ListSensitiveWordResponse {
  var runtime = new Util.RuntimeOptions{};
  return listSensitiveWordWithOptions(request, runtime);
}

model PublishLiveRequest {
  liveId?: string(name='LiveId'),
  userId?: string(name='UserId'),
}

model PublishLiveResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    anchorId?: string(name='AnchorId'),
    liveId?: string(name='LiveId'),
    liveUrl?: string(name='LiveUrl'),
    pushUrl?: string(name='PushUrl'),
    status?: string(name='Status'),
  }(name='Result'),
}

model PublishLiveResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: PublishLiveResponseBody(name='body'),
}

async function publishLiveWithOptions(request: PublishLiveRequest, runtime: Util.RuntimeOptions): PublishLiveResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.liveId)) {
    body['LiveId'] = request.liveId;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'PublishLive',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function publishLive(request: PublishLiveRequest): PublishLiveResponse {
  var runtime = new Util.RuntimeOptions{};
  return publishLiveWithOptions(request, runtime);
}

model PublishLiveRoomRequest {
  appId?: string(name='AppId'),
  liveId?: string(name='LiveId'),
  userId?: string(name='UserId'),
}

model PublishLiveRoomResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    liveId?: string(name='LiveId'),
    liveUrl?: string(name='LiveUrl'),
    pushUrl?: string(name='PushUrl'),
  }(name='Result'),
}

model PublishLiveRoomResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: PublishLiveRoomResponseBody(name='body'),
}

async function publishLiveRoomWithOptions(request: PublishLiveRoomRequest, runtime: Util.RuntimeOptions): PublishLiveRoomResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.liveId)) {
    body['LiveId'] = request.liveId;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'PublishLiveRoom',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function publishLiveRoom(request: PublishLiveRoomRequest): PublishLiveRoomResponse {
  var runtime = new Util.RuntimeOptions{};
  return publishLiveRoomWithOptions(request, runtime);
}

model RemoveMemberRequest {
  conferenceId?: string(name='ConferenceId'),
  fromUserId?: string(name='FromUserId'),
  toUserId?: string(name='ToUserId'),
}

model RemoveMemberResponseBody = {
  requestId?: string(name='RequestId'),
}

model RemoveMemberResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: RemoveMemberResponseBody(name='body'),
}

async function removeMemberWithOptions(request: RemoveMemberRequest, runtime: Util.RuntimeOptions): RemoveMemberResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.conferenceId)) {
    body['ConferenceId'] = request.conferenceId;
  }
  if (!Util.isUnset(request.fromUserId)) {
    body['FromUserId'] = request.fromUserId;
  }
  if (!Util.isUnset(request.toUserId)) {
    body['ToUserId'] = request.toUserId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'RemoveMember',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function removeMember(request: RemoveMemberRequest): RemoveMemberResponse {
  var runtime = new Util.RuntimeOptions{};
  return removeMemberWithOptions(request, runtime);
}

model SendCommentRequest {
  appId?: string(name='AppId'),
  content?: string(name='Content'),
  extension?: map[string]string(name='Extension'),
  roomId?: string(name='RoomId'),
  senderId?: string(name='SenderId'),
  senderNick?: string(name='SenderNick'),
}

model SendCommentShrinkRequest {
  appId?: string(name='AppId'),
  content?: string(name='Content'),
  extensionShrink?: string(name='Extension'),
  roomId?: string(name='RoomId'),
  senderId?: string(name='SenderId'),
  senderNick?: string(name='SenderNick'),
}

model SendCommentResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    commentVO?: {
      commentId?: string(name='CommentId'),
      content?: string(name='Content'),
      createAt?: long(name='CreateAt'),
      extension?: map[string]string(name='Extension'),
      senderId?: string(name='SenderId'),
      senderNick?: string(name='SenderNick'),
    }(name='CommentVO'),
  }(name='Result'),
}

model SendCommentResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SendCommentResponseBody(name='body'),
}

async function sendCommentWithOptions(tmpReq: SendCommentRequest, runtime: Util.RuntimeOptions): SendCommentResponse {
  Util.validateModel(tmpReq);
  var request = new SendCommentShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.extension)) {
    request.extensionShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.extension, 'Extension', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.content)) {
    body['Content'] = request.content;
  }
  if (!Util.isUnset(request.extensionShrink)) {
    body['Extension'] = request.extensionShrink;
  }
  if (!Util.isUnset(request.roomId)) {
    body['RoomId'] = request.roomId;
  }
  if (!Util.isUnset(request.senderId)) {
    body['SenderId'] = request.senderId;
  }
  if (!Util.isUnset(request.senderNick)) {
    body['SenderNick'] = request.senderNick;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'SendComment',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function sendComment(request: SendCommentRequest): SendCommentResponse {
  var runtime = new Util.RuntimeOptions{};
  return sendCommentWithOptions(request, runtime);
}

model SendCustomMessageToAllRequest {
  appId?: string(name='AppId'),
  body?: string(name='Body'),
  roomId?: string(name='RoomId'),
}

model SendCustomMessageToAllResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    messageId?: string(name='MessageId'),
  }(name='Result'),
}

model SendCustomMessageToAllResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SendCustomMessageToAllResponseBody(name='body'),
}

async function sendCustomMessageToAllWithOptions(request: SendCustomMessageToAllRequest, runtime: Util.RuntimeOptions): SendCustomMessageToAllResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.body)) {
    body['Body'] = request.body;
  }
  if (!Util.isUnset(request.roomId)) {
    body['RoomId'] = request.roomId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'SendCustomMessageToAll',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function sendCustomMessageToAll(request: SendCustomMessageToAllRequest): SendCustomMessageToAllResponse {
  var runtime = new Util.RuntimeOptions{};
  return sendCustomMessageToAllWithOptions(request, runtime);
}

model SendCustomMessageToUsersRequest {
  appId?: string(name='AppId'),
  body?: string(name='Body'),
  receiverList?: [ string ](name='ReceiverList'),
  roomId?: string(name='RoomId'),
}

model SendCustomMessageToUsersResponseBody = {
  requestId?: string(name='RequestId'),
  result?: {
    messageId?: string(name='MessageId'),
  }(name='Result'),
}

model SendCustomMessageToUsersResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SendCustomMessageToUsersResponseBody(name='body'),
}

async function sendCustomMessageToUsersWithOptions(request: SendCustomMessageToUsersRequest, runtime: Util.RuntimeOptions): SendCustomMessageToUsersResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.body)) {
    body['Body'] = request.body;
  }
  var bodyFlat : map[string]any = {};
  if (!Util.isUnset(request.receiverList)) {
    bodyFlat['ReceiverList'] = request.receiverList;
  }
  if (!Util.isUnset(request.roomId)) {
    body['RoomId'] = request.roomId;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'SendCustomMessageToUsers',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function sendCustomMessageToUsers(request: SendCustomMessageToUsersRequest): SendCustomMessageToUsersResponse {
  var runtime = new Util.RuntimeOptions{};
  return sendCustomMessageToUsersWithOptions(request, runtime);
}

model SetUserAdminRequest {
  appId?: string(name='AppId'),
  roomId?: string(name='RoomId'),
  userId?: string(name='UserId'),
}

model SetUserAdminResponseBody = {
  requestId?: string(name='RequestId'),
}

model SetUserAdminResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: SetUserAdminResponseBody(name='body'),
}

async function setUserAdminWithOptions(request: SetUserAdminRequest, runtime: Util.RuntimeOptions): SetUserAdminResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.roomId)) {
    body['RoomId'] = request.roomId;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'SetUserAdmin',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function setUserAdmin(request: SetUserAdminRequest): SetUserAdminResponse {
  var runtime = new Util.RuntimeOptions{};
  return setUserAdminWithOptions(request, runtime);
}

model StopClassRequest {
  appId?: string(name='AppId'),
  classId?: string(name='ClassId'),
  userId?: string(name='UserId'),
}

model StopClassResponseBody = {
  requestId?: string(name='RequestId'),
}

model StopClassResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: StopClassResponseBody(name='body'),
}

async function stopClassWithOptions(request: StopClassRequest, runtime: Util.RuntimeOptions): StopClassResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.classId)) {
    body['ClassId'] = request.classId;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'StopClass',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function stopClass(request: StopClassRequest): StopClassResponse {
  var runtime = new Util.RuntimeOptions{};
  return stopClassWithOptions(request, runtime);
}

model StopLiveRequest {
  appId?: string(name='AppId'),
  liveId?: string(name='LiveId'),
  roomId?: string(name='RoomId'),
  userId?: string(name='UserId'),
}

model StopLiveResponseBody = {
  requestId?: string(name='RequestId'),
}

model StopLiveResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: StopLiveResponseBody(name='body'),
}

async function stopLiveWithOptions(request: StopLiveRequest, runtime: Util.RuntimeOptions): StopLiveResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.liveId)) {
    body['LiveId'] = request.liveId;
  }
  if (!Util.isUnset(request.roomId)) {
    body['RoomId'] = request.roomId;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'StopLive',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function stopLive(request: StopLiveRequest): StopLiveResponse {
  var runtime = new Util.RuntimeOptions{};
  return stopLiveWithOptions(request, runtime);
}

model StopLiveRoomRequest {
  appId?: string(name='AppId'),
  liveId?: string(name='LiveId'),
  userId?: string(name='UserId'),
}

model StopLiveRoomResponseBody = {
  requestId?: string(name='RequestId'),
}

model StopLiveRoomResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: StopLiveRoomResponseBody(name='body'),
}

async function stopLiveRoomWithOptions(request: StopLiveRoomRequest, runtime: Util.RuntimeOptions): StopLiveRoomResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.liveId)) {
    body['LiveId'] = request.liveId;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'StopLiveRoom',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function stopLiveRoom(request: StopLiveRoomRequest): StopLiveRoomResponse {
  var runtime = new Util.RuntimeOptions{};
  return stopLiveRoomWithOptions(request, runtime);
}

model UpdateClassRequest {
  appId?: string(name='AppId'),
  classId?: string(name='ClassId'),
  createNickname?: string(name='CreateNickname'),
  createUserId?: string(name='CreateUserId'),
  title?: string(name='Title'),
}

model UpdateClassResponseBody = {
  requestId?: string(name='RequestId'),
}

model UpdateClassResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateClassResponseBody(name='body'),
}

async function updateClassWithOptions(request: UpdateClassRequest, runtime: Util.RuntimeOptions): UpdateClassResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.classId)) {
    body['ClassId'] = request.classId;
  }
  if (!Util.isUnset(request.createNickname)) {
    body['CreateNickname'] = request.createNickname;
  }
  if (!Util.isUnset(request.createUserId)) {
    body['CreateUserId'] = request.createUserId;
  }
  if (!Util.isUnset(request.title)) {
    body['Title'] = request.title;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateClass',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateClass(request: UpdateClassRequest): UpdateClassResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateClassWithOptions(request, runtime);
}

model UpdateLiveRequest {
  introduction?: string(name='Introduction'),
  liveId?: string(name='LiveId'),
  title?: string(name='Title'),
}

model UpdateLiveResponseBody = {
  requestId?: string(name='RequestId'),
}

model UpdateLiveResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateLiveResponseBody(name='body'),
}

async function updateLiveWithOptions(request: UpdateLiveRequest, runtime: Util.RuntimeOptions): UpdateLiveResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.introduction)) {
    body['Introduction'] = request.introduction;
  }
  if (!Util.isUnset(request.liveId)) {
    body['LiveId'] = request.liveId;
  }
  if (!Util.isUnset(request.title)) {
    body['Title'] = request.title;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateLive',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateLive(request: UpdateLiveRequest): UpdateLiveResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateLiveWithOptions(request, runtime);
}

model UpdateLiveRoomRequest {
  anchorId?: string(name='AnchorId'),
  anchorNick?: string(name='AnchorNick'),
  appId?: string(name='AppId'),
  coverUrl?: string(name='CoverUrl'),
  extension?: map[string]string(name='Extension'),
  liveId?: string(name='LiveId'),
  notice?: string(name='Notice'),
  title?: string(name='Title'),
  userId?: string(name='UserId'),
}

model UpdateLiveRoomShrinkRequest {
  anchorId?: string(name='AnchorId'),
  anchorNick?: string(name='AnchorNick'),
  appId?: string(name='AppId'),
  coverUrl?: string(name='CoverUrl'),
  extensionShrink?: string(name='Extension'),
  liveId?: string(name='LiveId'),
  notice?: string(name='Notice'),
  title?: string(name='Title'),
  userId?: string(name='UserId'),
}

model UpdateLiveRoomResponseBody = {
  requestId?: string(name='RequestId'),
}

model UpdateLiveRoomResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateLiveRoomResponseBody(name='body'),
}

async function updateLiveRoomWithOptions(tmpReq: UpdateLiveRoomRequest, runtime: Util.RuntimeOptions): UpdateLiveRoomResponse {
  Util.validateModel(tmpReq);
  var request = new UpdateLiveRoomShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.extension)) {
    request.extensionShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.extension, 'Extension', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.anchorId)) {
    body['AnchorId'] = request.anchorId;
  }
  if (!Util.isUnset(request.anchorNick)) {
    body['AnchorNick'] = request.anchorNick;
  }
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.coverUrl)) {
    body['CoverUrl'] = request.coverUrl;
  }
  if (!Util.isUnset(request.extensionShrink)) {
    body['Extension'] = request.extensionShrink;
  }
  if (!Util.isUnset(request.liveId)) {
    body['LiveId'] = request.liveId;
  }
  if (!Util.isUnset(request.notice)) {
    body['Notice'] = request.notice;
  }
  if (!Util.isUnset(request.title)) {
    body['Title'] = request.title;
  }
  if (!Util.isUnset(request.userId)) {
    body['UserId'] = request.userId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateLiveRoom',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateLiveRoom(request: UpdateLiveRoomRequest): UpdateLiveRoomResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateLiveRoomWithOptions(request, runtime);
}

model UpdateRoomRequest {
  appId?: string(name='AppId'),
  extension?: map[string]string(name='Extension'),
  notice?: string(name='Notice'),
  roomId?: string(name='RoomId'),
  roomOwnerId?: string(name='RoomOwnerId'),
  title?: string(name='Title'),
}

model UpdateRoomShrinkRequest {
  appId?: string(name='AppId'),
  extensionShrink?: string(name='Extension'),
  notice?: string(name='Notice'),
  roomId?: string(name='RoomId'),
  roomOwnerId?: string(name='RoomOwnerId'),
  title?: string(name='Title'),
}

model UpdateRoomResponseBody = {
  requestId?: string(name='RequestId'),
}

model UpdateRoomResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateRoomResponseBody(name='body'),
}

async function updateRoomWithOptions(tmpReq: UpdateRoomRequest, runtime: Util.RuntimeOptions): UpdateRoomResponse {
  Util.validateModel(tmpReq);
  var request = new UpdateRoomShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.extension)) {
    request.extensionShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.extension, 'Extension', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.extensionShrink)) {
    body['Extension'] = request.extensionShrink;
  }
  if (!Util.isUnset(request.notice)) {
    body['Notice'] = request.notice;
  }
  if (!Util.isUnset(request.roomId)) {
    body['RoomId'] = request.roomId;
  }
  if (!Util.isUnset(request.roomOwnerId)) {
    body['RoomOwnerId'] = request.roomOwnerId;
  }
  if (!Util.isUnset(request.title)) {
    body['Title'] = request.title;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateRoom',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateRoom(request: UpdateRoomRequest): UpdateRoomResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateRoomWithOptions(request, runtime);
}

model UpdateShareScreenLayoutRequest {
  appId?: string(name='AppId'),
  classId?: string(name='ClassId'),
  enableOverlay?: boolean(name='EnableOverlay'),
  overlayHeight?: float(name='OverlayHeight'),
  overlayWidth?: float(name='OverlayWidth'),
  overlayX?: float(name='OverlayX'),
  overlayY?: float(name='OverlayY'),
}

model UpdateShareScreenLayoutResponseBody = {
  requestId?: string(name='RequestId'),
}

model UpdateShareScreenLayoutResponse = {
  headers: map[string]string(name='headers'),
  statusCode: int32(name='statusCode'),
  body: UpdateShareScreenLayoutResponseBody(name='body'),
}

async function updateShareScreenLayoutWithOptions(request: UpdateShareScreenLayoutRequest, runtime: Util.RuntimeOptions): UpdateShareScreenLayoutResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.appId)) {
    body['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.classId)) {
    body['ClassId'] = request.classId;
  }
  if (!Util.isUnset(request.enableOverlay)) {
    body['EnableOverlay'] = request.enableOverlay;
  }
  if (!Util.isUnset(request.overlayHeight)) {
    body['OverlayHeight'] = request.overlayHeight;
  }
  if (!Util.isUnset(request.overlayWidth)) {
    body['OverlayWidth'] = request.overlayWidth;
  }
  if (!Util.isUnset(request.overlayX)) {
    body['OverlayX'] = request.overlayX;
  }
  if (!Util.isUnset(request.overlayY)) {
    body['OverlayY'] = request.overlayY;
  }
  var req = new OpenApi.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateShareScreenLayout',
    version = '2021-06-30',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function updateShareScreenLayout(request: UpdateShareScreenLayoutRequest): UpdateShareScreenLayoutResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateShareScreenLayoutWithOptions(request, runtime);
}

